package com.ds.common.web.response;

import java.util.List;

/**
 * @class: PageBuild
 * @description:
 * @author: fs
 * @create: 2024/8/19 11:10
 **/
public class PageBuilder {

    public static <T> PageInfo<T> build(List<T> list, int pages, long total, int pageNum) {
        PageInfo<T> rspData = new PageInfo<>();
        rspData.setPageNum(pageNum);
        rspData.setPages(pages);
        rspData.setTotal(total);
        rspData.setList(list);
        return rspData;
    }
}
